import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

import Layout from '@/pages/layouts/Layout'
import Systeminfo from '@/pages/system/Systeminfo'
import About from '@/pages/system/About'
import Orderlist from '@/pages/order/Orderlist'
import Adduser from '@/pages/user/Adduser'
import Userlist from '@/pages/user/Userlist'
import Storelist from '@/pages/store/Storelist'
import Addstore from '@/pages/store/Addstore'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/admin',
      name: 'Layout',
      component: Layout,
      children: [
        { path: '/', component: Systeminfo },
        { path: 'systeminfo', component: Systeminfo },
        { path: 'about', component: About },
        { path: 'orderlist', component: Orderlist },
        { path: 'userlist', component: Userlist },
        { path: 'adduser', component: Adduser },
        { path: 'storelist', component: Storelist },
        { path: 'addstore', component: Addstore }
      ]
    }

  ]
})
